<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
		<title>查看图片页</title>
		<script src="../../script/jquery.min.js" type="text/javascript"></script>
		<link rel="stylesheet" href="../../css/CFNetPP_Base.css">
		<link rel="stylesheet" href="../../css/base.css"/>
			<link rel="stylesheet" href="../../css/personal.css">
		<style>
			body, html {
				height: 100%;
				background-color: rgba(0,0,0,0.5);
			}
			.ApplyCertificateBtn {
				position: absolute;
				display: inline-block;
				text-decoration: none;
				color: #FFFFFF;
				padding: 2px 3px;
				font-size: 14px;
				border-radius: 2px;
				right: 5px;
				/*bottom: 10px;*/
				top: 10px;
				background: #1099cb;
				border: 2px solid #1099cb;
				width: 95px;
				text-align: center;
			}
		</style>
	</head>
	<body>
		<div class=""  id="noData" >
			<img id="usericon" src="" alt="" width="100%">
		</div>
	</body>
	<script type="text/javascript" src="../../script/api.js"></script>
	<script type="text/javascript" src="../../script/MD5.js"></script>
	<script type="text/javascript" src="../../script/requestTool.js"></script>
	<script src="../../script/common.js"></script>
	<script type="text/javascript">
		apiready = function() {
			prepareData();
			setupSubFrame();
			setupNotifi();
		};
		function setupSubFrame() {
			var pageParam = api.pageParam;
			//图片地址
			var files = '';
			if (pageParam.img.indexOf("http") != -1) {//包含
				files = pageParam.img;
			} else {
				files = 'http://' + pageParam.img;
			}
			//根据图片地址，显示图片
			$('#usericon').attr('src', files);
			api.openFrame({//打开返回按钮
				name : 'MyAttestationFrameInfo_back',
				url : 'MyAttestationFrameInfo_back.html',
				rect : {
					x : 0,
					y : 0,
					w : '44',
					h : '44'
				}
			});
			api.addEventListener({
				name : 'keyback'
			}, function(ret, err) {
				// 旋转屏幕至竖屏
				api.setScreenOrientation({
					orientation : 'portrait_up'
				});
				// 取消全屏
				api.setFullScreen({
					fullScreen : false
				});
				api.closeWin({
				});
			})
		}

		function prepareData() {
			//向左旋转屏幕
			api.setScreenOrientation({
				orientation : 'landscape_left'
			});
		}

		function setupNotifi() {
			//监听返回按钮
			api.addEventListener({
				name : 'keyback'
			}, function(ret, err) {
				onBackClick();
			});
			//监听页面返回按钮
			api.addEventListener({
				name : 'hdBackNotifi'
			}, function(ret, err) {
				onBackClick();
			});
		}

		function onBackClick() {
			api.setScreenOrientation({
				orientation : 'portrait_up'
			});
			api.closeWin();
		}

		function closeFrame() {
			// 旋转屏幕至竖屏
			api.setScreenOrientation({
				orientation : 'portrait_up'
			});
			if (api.systemType == "ios") {
				api.openWin({useWKWebView:true,
					name : 'index',
					url : '../../index.html'
				});
			} else {
				api.closeWin({
				});
			}
		}
	</script>
</html>